var config = {
    /**
     * 增删改查，api地址
     * @total 获取总条数api
     * @get   获取数据api
     * @edit  修改数据api
     *
     * model        类名
     * action       方法名 
     */
    set_url: {
        "total": { model: "goods", action: "get_goods_total" },
        "get": { model: "goods", action: "get_goods_all" },
        "edit": { model: "goods", action: "on_goods_edit" }
    },

    /**
     *
     * 筛选查询
     * @type {Array}
     */
    select: [
        [{
            label: "",
            type: "input",
            field: "receipt",
            labelWidth: "120",
            placeholder: "请输入单号或者供应商或者备注",
            span: 6
        }, {
            label: "日期",
            type: "daterange",
            field: "receipt_date",
            labelWidth: "120",
            placeholder: "选择日期",
            span: 8,
            range: "至",
            start: "开始时间",
            end: "结束时间"
        }]
    ],

    /**
     * 表格操作按钮配置
     * @type {Array}
     */
    action: [{
        label: "新增",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: '/empty',
        }
    }, {
        label: "导出",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: '/empty',
        }
    }, {
        label: "删除",
        type: "primary",
        icon: "",
        callback: {
            type: 'target',
            path: '/empty',
        }
    }],

    /**
     * 表格配置
     * @type {Boolean}
     */
    selection: true,
    model: 'input',
    table: [{
        label: '操作',
        type: 'action',
        field: 'action',
        labelWidth:80,
        sortable: false,
        option: [{
            label: "修改",
            callback: {
                type: 'target',
                path: "/empty"
            },
            type: "primary",
            icon: "",
        }, {
            label: "删除",
            callback: {
                type: 'message',
                url: ['goods', 'on_goods_delete'],
                params: ['goods_id'],
                config: {
                    type: 'warning',
                    title: '系统提示',
                    content: '此操作将永久删除删除文件不可恢复，是否继续！',
                    confirm: '继续',
                    cancel: '取消',
                    confirmTips: {
                        type: 'success',
                        message: '删除成功！',
                    },
                    cancelTips: {
                        type: 'info',
                        message: '您取消了删除！',
                    }
                }
            },
            type: "primary",
            icon: "",
        }]
    }, {
        label: "业务类别",
        type: "input",
        field: "PRecords_type",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "客户名称",
        type: "input",
        field: "client_name",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "供应商名称",
        type: "input",
        field: "supplier_name",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "核销金额",
        type: "input",
        field: "writeOff_amount",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "制单人",
        type: "input",
        field: "preson",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }, {
        label: "备注",
        type: "input",
        field: "note",
        labelWidth: "120",
        sortable: false,
        amend: false,
    }],

    /**
     * 分页配置
     * @type {Object}
     */
    page: {
        size: 10,
        current: 1,
        total: 100
    }
}
export default config;